﻿using IceZero.DataStore;

namespace IceZero.RootNode
{
    public class DataStoreNode
    {
        /// <summary>
        /// 
        /// </summary>
        public UserDataStore UserDataStore { get; }

        /// <summary>
        /// 
        /// </summary>
        public UserGroupDataStore UserGroupDataStore { get; }
        /// <summary>
        /// 
        /// </summary>
        public CatDataStore CatDataStore { get; }

        /// <summary>
        /// 
        /// </summary>
        public ShortLinkDataStore ShortLinkDataStore { get; }
        /// <summary>
        /// 
        /// </summary>
        public TableRecordIncrementDataStore TableRecordIncrementDataStore { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public OperationActionDataStore OperationActionDataStore { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public OperationActionComboDataStore OperationActionComboDataStore { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public OperationActionComboUsedDataStore OperationActionComboUsedDataStore { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public OperationRecordDataStore OperationRecordDataStore { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public OperationStatisticRecordDataStore OperationStatisticRecordDataStore { get; set; }

        /// <summary>
        /// 获取数据存储对象
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        public DataStoreBase<T> GetDataStore<T>() where T : class, new()
        {
            return new DataStoreBase<T>();
        }

        public DataStoreNode()
        {
            CatDataStore = new();
            UserDataStore = new();
            UserGroupDataStore = new();
            ShortLinkDataStore = new();
            TableRecordIncrementDataStore = new();
            OperationActionDataStore = new();
            OperationActionComboDataStore = new();
            OperationActionComboUsedDataStore = new();
            OperationRecordDataStore = new();
            OperationStatisticRecordDataStore = new();
        }
    }
}
